/**
 * Generate time : 2012-01-09 14:15:09
 * Version : 1.0.1.V20070717
 */
package com.baosight.sczx.zm.ce.domain;

import com.baosight.iplat4j.util.NumberUtils;
import com.baosight.iplat4j.core.ei.EiColumn;
import com.baosight.iplat4j.ep.DaoEPBase;
import java.util.HashMap;
import java.util.Map;
import com.baosight.iplat4j.util.StringUtils;

/**
 * ZMCEAffiliatedEquipment table comment : 附属设备
 */
public class ZMCEAffiliatedEquipment extends DaoEPBase {

	private String fdKeyId = " "; /* FD_KEY_ID */
	private String fdEquipmentId = " "; /* 对应设备ID */
	private String fdCode = " "; /* 编号 */
	private String fdName = " "; /* 名称 */
	private String fdSpecifications = " "; /* 规格 */
	private String fdModel = " "; /* 型号 */
	private String fdEquipmentClassId = " "; /* 设备分类ID */
	private String fdManufacturers = " "; /* 出产厂家 */
	private String fdOutdate = " "; /* 出厂日期 */
	private String fdOutCode = " "; /* 出厂编号 */
	private Long fdUseingYear = new Long(0); /* 使用年限 */
	private String fdScrapDate = " "; /* 报废日期 */
	private String fdRemarks = " "; /* 备注 */

	/**
	 * initialize the metadata
	 */
	public void initMetaData() {
		EiColumn eiColumn;

		eiColumn = new EiColumn("fdKeyId");
		eiColumn.setPrimaryKey(true);
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("FD_KEY_ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("对应设备ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdName");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("名称");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdSpecifications");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("规格");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdModel");
		eiColumn.setFieldLength(30);
		eiColumn.setDescName("型号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdEquipmentClassId");
		eiColumn.setFieldLength(32);
		eiColumn.setDescName("设备分类ID");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdManufacturers");
		eiColumn.setFieldLength(50);
		eiColumn.setDescName("出产厂家");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdOutdate");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("出厂日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdOutCode");
		eiColumn.setFieldLength(20);
		eiColumn.setDescName("出厂编号");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdUseingYear");
		eiColumn.setType("N");
		eiColumn.setScaleLength(0);
		eiColumn.setFieldLength(38);
		eiColumn.setDescName("使用年限");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdScrapDate");
		eiColumn.setFieldLength(10);
		eiColumn.setDescName("报废日期");
		eiMetadata.addMeta(eiColumn);

		eiColumn = new EiColumn("fdRemarks");
		eiColumn.setFieldLength(250);
		eiColumn.setDescName("备注");
		eiMetadata.addMeta(eiColumn);

	}

	/**
	 * the constructor
	 */
	public ZMCEAffiliatedEquipment() {
		initMetaData();
	}

	/**
	 * get the fdKeyId - FD_KEY_ID
	 * 
	 * @return the fdKeyId
	 */
	public String getFdKeyId() {
		return this.fdKeyId;
	}

	/**
	 * set the fdKeyId - FD_KEY_ID
	 */
	public void setFdKeyId(String fdKeyId) {
		this.fdKeyId = fdKeyId;
	}

	/**
	 * get the fdEquipmentId - 对应设备ID
	 * 
	 * @return the fdEquipmentId
	 */
	public String getFdEquipmentId() {
		return this.fdEquipmentId;
	}

	/**
	 * set the fdEquipmentId - 对应设备ID
	 */
	public void setFdEquipmentId(String fdEquipmentId) {
		this.fdEquipmentId = fdEquipmentId;
	}

	/**
	 * get the fdCode - 编号
	 * 
	 * @return the fdCode
	 */
	public String getFdCode() {
		return this.fdCode;
	}

	/**
	 * set the fdCode - 编号
	 */
	public void setFdCode(String fdCode) {
		this.fdCode = fdCode;
	}

	/**
	 * get the fdName - 名称
	 * 
	 * @return the fdName
	 */
	public String getFdName() {
		return this.fdName;
	}

	/**
	 * set the fdName - 名称
	 */
	public void setFdName(String fdName) {
		this.fdName = fdName;
	}

	/**
	 * get the fdSpecifications - 规格
	 * 
	 * @return the fdSpecifications
	 */
	public String getFdSpecifications() {
		return this.fdSpecifications;
	}

	/**
	 * set the fdSpecifications - 规格
	 */
	public void setFdSpecifications(String fdSpecifications) {
		this.fdSpecifications = fdSpecifications;
	}

	/**
	 * get the fdModel - 型号
	 * 
	 * @return the fdModel
	 */
	public String getFdModel() {
		return this.fdModel;
	}

	/**
	 * set the fdModel - 型号
	 */
	public void setFdModel(String fdModel) {
		this.fdModel = fdModel;
	}

	/**
	 * get the fdEquipmentClassId - 设备分类ID
	 * 
	 * @return the fdEquipmentClassId
	 */
	public String getFdEquipmentClassId() {
		return this.fdEquipmentClassId;
	}

	/**
	 * set the fdEquipmentClassId - 设备分类ID
	 */
	public void setFdEquipmentClassId(String fdEquipmentClassId) {
		this.fdEquipmentClassId = fdEquipmentClassId;
	}

	/**
	 * get the fdManufacturers - 出产厂家
	 * 
	 * @return the fdManufacturers
	 */
	public String getFdManufacturers() {
		return this.fdManufacturers;
	}

	/**
	 * set the fdManufacturers - 出产厂家
	 */
	public void setFdManufacturers(String fdManufacturers) {
		this.fdManufacturers = fdManufacturers;
	}

	/**
	 * get the fdOutdate - 出厂日期
	 * 
	 * @return the fdOutdate
	 */
	public String getFdOutdate() {
		return this.fdOutdate;
	}

	/**
	 * set the fdOutdate - 出厂日期
	 */
	public void setFdOutdate(String fdOutdate) {
		this.fdOutdate = fdOutdate;
	}

	/**
	 * get the fdOutCode - 出厂编号
	 * 
	 * @return the fdOutCode
	 */
	public String getFdOutCode() {
		return this.fdOutCode;
	}

	/**
	 * set the fdOutCode - 出厂编号
	 */
	public void setFdOutCode(String fdOutCode) {
		this.fdOutCode = fdOutCode;
	}

	/**
	 * get the fdUseingYear - 使用年限
	 * 
	 * @return the fdUseingYear
	 */
	public Long getFdUseingYear() {
		return this.fdUseingYear;
	}

	/**
	 * set the fdUseingYear - 使用年限
	 */
	public void setFdUseingYear(Long fdUseingYear) {
		this.fdUseingYear = fdUseingYear;
	}

	/**
	 * get the fdScrapDate - 报废日期
	 * 
	 * @return the fdScrapDate
	 */
	public String getFdScrapDate() {
		return this.fdScrapDate;
	}

	/**
	 * set the fdScrapDate - 报废日期
	 */
	public void setFdScrapDate(String fdScrapDate) {
		this.fdScrapDate = fdScrapDate;
	}

	/**
	 * get the fdRemarks - 备注
	 * 
	 * @return the fdRemarks
	 */
	public String getFdRemarks() {
		return this.fdRemarks;
	}

	/**
	 * set the fdRemarks - 备注
	 */
	public void setFdRemarks(String fdRemarks) {
		this.fdRemarks = fdRemarks;
	}

	/**
	 * get the value from Map
	 */
	@SuppressWarnings("rawtypes")
	public void fromMap(Map map) {

		setFdKeyId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdKeyId")), fdKeyId));
		setFdEquipmentId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentId")), fdEquipmentId));
		setFdCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdCode")), fdCode));
		setFdName(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdName")), fdName));
		setFdSpecifications(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdSpecifications")), fdSpecifications));
		setFdModel(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdModel")), fdModel));
		setFdEquipmentClassId(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdEquipmentClassId")), fdEquipmentClassId));
		setFdManufacturers(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdManufacturers")), fdManufacturers));
		setFdOutdate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOutdate")), fdOutdate));
		setFdOutCode(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdOutCode")), fdOutCode));
		setFdUseingYear(NumberUtils.toLong(StringUtils.toString(map.get("fdUseingYear")), fdUseingYear));
		setFdScrapDate(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdScrapDate")), fdScrapDate));
		setFdRemarks(StringUtils.defaultIfEmpty(StringUtils.toString(map.get("fdRemarks")), fdRemarks));
	}

	/**
	 * set the value to Map
	 */
	@SuppressWarnings({ "rawtypes", "unchecked" })
	public Map toMap() {

		Map map = new HashMap();
		map.put("fdKeyId", StringUtils.toString(fdKeyId, eiMetadata.getMeta("fdKeyId")));
		map.put("fdEquipmentId", StringUtils.toString(fdEquipmentId, eiMetadata.getMeta("fdEquipmentId")));
		map.put("fdCode", StringUtils.toString(fdCode, eiMetadata.getMeta("fdCode")));
		map.put("fdName", StringUtils.toString(fdName, eiMetadata.getMeta("fdName")));
		map.put("fdSpecifications", StringUtils.toString(fdSpecifications, eiMetadata.getMeta("fdSpecifications")));
		map.put("fdModel", StringUtils.toString(fdModel, eiMetadata.getMeta("fdModel")));
		map.put("fdEquipmentClassId", StringUtils.toString(fdEquipmentClassId, eiMetadata.getMeta("fdEquipmentClassId")));
		map.put("fdManufacturers", StringUtils.toString(fdManufacturers, eiMetadata.getMeta("fdManufacturers")));
		map.put("fdOutdate", StringUtils.toString(fdOutdate, eiMetadata.getMeta("fdOutdate")));
		map.put("fdOutCode", StringUtils.toString(fdOutCode, eiMetadata.getMeta("fdOutCode")));
		map.put("fdUseingYear", StringUtils.toString(fdUseingYear, eiMetadata.getMeta("fdUseingYear")));
		map.put("fdScrapDate", StringUtils.toString(fdScrapDate, eiMetadata.getMeta("fdScrapDate")));
		map.put("fdRemarks", StringUtils.toString(fdRemarks, eiMetadata.getMeta("fdRemarks")));

		return map;

	}
}